<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>bmqt_messageguid Component</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javaScript" src="search/search.js"></script>
<link href="bdedox.css" rel="stylesheet" type="text/css"/>
    <style>
      div.hanging {
        padding-left: 0.75in;
        text-indent: -0.50in;
      }
      div.unhanging {
        text-indent:     0in;
      }
      a.glossary {
        font-weight: bold;
        font-style: italic;
      }
    </style>
</head>
<!--
<body onload='searchBox.OnSelectItem(0);'>
-->
<body>

<table border=2 cellspacing=0 cellpadding=0 align=center>
<tr>
 <td valign=top align=center>
 <p align=center><b><i>Quick Links:</i></b></p>
 </td>
 <td valign=top align=center>
 <p align=center>
<a class="qindex" href="group__bmqa.html" target="_blank">bmqa</a> | <a class="qindex" href="group__bmqpi.html" target="_blank">bmqpi</a> | <a class="qindex" href="group__bmqt.html" target="_blank">bmqt</a>
 </td>
 </tr>
 </table>

  </div>
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul class="tablist">
      <li><a href="components.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="components.html"><span>Components</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#namespaces">Namespaces</a>  </div>
  <div class="headertitle">
<h1>Component bmqt_messageguid<br/>
<small>
[<a class="el" href="group__bmqt.html">Package bmqt</a>]</small>
</h1>  </div>
</div>
<div class="contents">

<p>Provide a value-semantic global unique identifier for BlazingMQ.  
<a href="#_details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="namespaces"></a>
Namespaces</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">namespace &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacebmqt.html">bmqt</a></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<dl class="user"><dt><b>Outline</b></dt><dd><ul>
<li>
<a href="#1">Purpose</a> </li>
<li>
<a href="#2">Classes</a> </li>
<li>
<a href="#3">Description</a> <ul>
<li>
<a href="#3.1">Externalization</a> </li>
<li>
<a href="#3.2">Efficient comparison and hash function</a> <ul>
<li>
<a href="#3.2.1">Example 1: Externalizing</a> </li>
</ul>
</li>
</ul>
</li>
</ul>
</dd></dl>
<dl class="user"><dt><b></b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd><a class="anchor" id="purpose"></a> <a class="anchor" id="1"></a> </dd></dl>
<dl class="user"><dt><b>Purpose: </b></dt><dd>Provide a value-semantic global unique identifier for BlazingMQ messages. </dd></dl>
<dl class="user"><dt><b></b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd><a class="anchor" id="classes"></a> <a class="anchor" id="2"></a> </dd></dl>
<dl class="user"><dt><b>Classes: </b></dt><dd><table class="doxtable">
<tr>
<td><a class="el" href="classbmqt_1_1MessageGUID.html">bmqt::MessageGUID</a>  </td><td>Value-semantic global unique ID for BlazingMQ  </td></tr>
</table>
message <a class="el" href="structbmqt_1_1MessageGUIDLess.html">bmqt::MessageGUIDLess</a> : Binary function for comparing GUIDs. <a class="el" href="classbmqt_1_1MessageGUIDHashAlgo.html">bmqt::MessageGUIDHashAlgo</a> : Provide a hashing algorithm for Message GUID. </dd></dl>
<dl class="user"><dt><b></b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd><a class="anchor" id="description"></a> <a class="anchor" id="3"></a> </dd></dl>
<dl class="user"><dt><b>Description: </b></dt><dd><code><a class="el" href="classbmqt_1_1MessageGUID.html">bmqt::MessageGUID</a></code> provides a value-semantic global unique identifier for BlazingMQ messages. Each <a class="el" href="classbmqa_1_1Message.html">bmqa::Message</a> delivered to BlazingMQ client from BlazingMQ broker contains a unique MessageGUID. The binary function <code><a class="el" href="structbmqt_1_1MessageGUIDLess.html">bmqt::MessageGUIDLess</a></code> can be used for comparing GUIDs, and an optimized custom hash function is provided with <code><a class="el" href="classbmqt_1_1MessageGUIDHashAlgo.html">bmqt::MessageGUIDHashAlgo</a></code>. </dd></dl>
<dl class="user"><dt><b></b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd><a class="anchor" id="externalization"></a> <a class="anchor" id="description.externalization"></a> <a class="anchor" id="3.1"></a> </dd></dl>
<dl class="user"><dt><b>Externalization: </b></dt><dd>For convenience, this class provides <code>toHex</code> method that can be used to externalize a <code><a class="el" href="classbmqt_1_1MessageGUID.html">bmqt::MessageGUID</a></code> instance. Applications can persist the resultant buffer (on filesystem, in database) to keep track of last processed message ID across task instantiations. <code>fromHex</code> method can be used to convert a valid externalized buffer back to a message ID. </dd></dl>
<dl class="user"><dt><b></b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd><a class="anchor" id="efficient_comparison_and_hash_function"></a> <a class="anchor" id="description.efficient_comparison_and_hash_function"></a> <a class="anchor" id="3.2"></a> </dd></dl>
<dl class="user"><dt><b>Efficient comparison and hash function: </b></dt><dd>This component also provides efficient comparison and hash functions for convenience, and thus, applications can use this component as a key in associative containers. </dd></dl>
<dl class="user"><dt><b></b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd></dd></dl>
<dl class="user"><dt><b></b></dt><dd><a class="anchor" id="example_1~3A_externalizing"></a> <a class="anchor" id="efficient_comparison_and_hash_function.example_1~3A_externalizing"></a> <a class="anchor" id="description.efficient_comparison_and_hash_function.example_1~3A_externalizing"></a> <a class="anchor" id="example_1"></a> <a class="anchor" id="efficient_comparison_and_hash_function.example_1"></a> <a class="anchor" id="description.efficient_comparison_and_hash_function.example_1"></a> <a class="anchor" id="3.2.1"></a> </dd></dl>
<dl class="user"><dt><b>Example 1: Externalizing: </b></dt><dd><div class="fragment"><pre class="fragment">  <span class="comment">// Below, &#39;msg&#39; is a valid instance of &#39;bmqa::Message&#39; obtained from an</span>
  <span class="comment">// instance of &#39;bmqa::Session&#39;:</span>

  <a class="code" href="classbmqt_1_1MessageGUID.html">bmqt::MessageGUID</a> g1 = msg.messageId();

  <span class="keywordtype">char</span> buffer[bmqt::MessageGUID::e_SIZE_HEX];
  g1.<a class="code" href="classbmqt_1_1MessageGUID.html#a1dc9e832f55c3e68a7ae7869e8025793">toHex</a>(buffer);

  BSLS_ASSERT(<span class="keyword">true</span> == <a class="code" href="classbmqt_1_1MessageGUID.html#ada74a7f11f89ef9ed17d823b47d90b2c">bmqt::MessageGUID::isValidHexRepresentation</a>(buffer));

  <a class="code" href="classbmqt_1_1MessageGUID.html">bmqt::MessageGUID</a> g2;
  g2.<a class="code" href="classbmqt_1_1MessageGUID.html#a76a94bb992e42149e950273ae96e2986">fromHex</a>(buffer);

  BSLS_ASSERT(g1 == g2);
</pre></div> </dd></dl>
<dl class="user"><dt><b></b></dt><dd></dd></dl>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Thu Jun 15 2023 11:58:51 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.1 </small></address>
</body>
</html>
